package com.bosssoft.service.impl;

import com.bosssoft.entity.dto.FibNewsDTO;
import com.bosssoft.entity.po.FibNewsPO;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bosssoft.mapper.FibNewsMapper;
import com.bosssoft.service.FibNewsService;
/**
 * @author Li kexi
 * Created on 2021/8/19.17:28
 */
@Service
public class FibNewsServiceImpl extends ServiceImpl<FibNewsMapper, FibNewsPO> implements FibNewsService{

    @Override
    @Async
    public boolean sendNews(FibNewsDTO fibNewsDTO) {
        FibNewsPO fibNewsPO = new FibNewsPO();
        BeanUtils.copyProperties(fibNewsDTO,fibNewsPO);
        boolean save = save(fibNewsPO);
        return save;
    }
}
